package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DonationFeedbackMapper;
import com.ruoyi.system.domain.DonationFeedback;
import com.ruoyi.system.service.IDonationFeedbackService;

/**
 * 捐赠反馈Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-11
 */
@Service
public class DonationFeedbackServiceImpl implements IDonationFeedbackService 
{
    @Autowired
    private DonationFeedbackMapper donationFeedbackMapper;

    /**
     * 查询捐赠反馈
     * 
     * @param feedbackId 捐赠反馈主键
     * @return 捐赠反馈
     */
    @Override
    public DonationFeedback selectDonationFeedbackByFeedbackId(Long feedbackId)
    {
        return donationFeedbackMapper.selectDonationFeedbackByFeedbackId(feedbackId);
    }

    /**
     * 查询捐赠反馈列表
     * 
     * @param donationFeedback 捐赠反馈
     * @return 捐赠反馈
     */
    @Override
    public List<DonationFeedback> selectDonationFeedbackList(DonationFeedback donationFeedback)
    {
        return donationFeedbackMapper.selectDonationFeedbackList(donationFeedback);
    }

    /**
     * 新增捐赠反馈
     * 
     * @param donationFeedback 捐赠反馈
     * @return 结果
     */
    @Override
    public int insertDonationFeedback(DonationFeedback donationFeedback)
    {
        donationFeedback.setCreateTime(DateUtils.getNowDate());
        return donationFeedbackMapper.insertDonationFeedback(donationFeedback);
    }

    /**
     * 修改捐赠反馈
     * 
     * @param donationFeedback 捐赠反馈
     * @return 结果
     */
    @Override
    public int updateDonationFeedback(DonationFeedback donationFeedback)
    {
        return donationFeedbackMapper.updateDonationFeedback(donationFeedback);
    }

    /**
     * 批量删除捐赠反馈
     * 
     * @param feedbackIds 需要删除的捐赠反馈主键
     * @return 结果
     */
    @Override
    public int deleteDonationFeedbackByFeedbackIds(Long[] feedbackIds)
    {
        return donationFeedbackMapper.deleteDonationFeedbackByFeedbackIds(feedbackIds);
    }

    /**
     * 删除捐赠反馈信息
     * 
     * @param feedbackId 捐赠反馈主键
     * @return 结果
     */
    @Override
    public int deleteDonationFeedbackByFeedbackId(Long feedbackId)
    {
        return donationFeedbackMapper.deleteDonationFeedbackByFeedbackId(feedbackId);
    }
}
